<script>
jQuery.noConflict();
(function($) {
    $(function() {
       $(".data").mask("99/99/9999");
       $(".cpf").mask("999.999.999-99");
       $(".cep").mask("99999-999");
       $(".fone").mask("(99) 9999-9999");
    });
})(jQuery);
</script>

<form name="form_insert" action="<?= site_url('default/clientes/save/'); ?>" method="POST" enctype="multipart/form-data" class="ui-widget-content">
    <div id="cadastro">
        <div id="cadastro_geral">
            
            <!--coluna 1-->
            <div class="coluna1">
                <p> Nome:<br><input name="geral_nome" type="text" id="geral_nome" style="width:200px;" maxlength="500" />
                    *
                </p>
                    
                <p>• E-mail:<br>
                    <input name="geral_email" type="text" id="geral_email" style="width:200px;" maxlength="500" />
                    *</p>
                        
                <p>• Confirme seu e-mail:<br>
                    <input name="geral_email_confirma" type="text" id="geral_email_confirma" style="width:200px;"  maxlength="50"/>
                    *</p>
                <p>• Senha:<br>
                    <input name="geral_senha" type="password" id="geral_senha" style="width:200px;" maxlength="9"/>
                    *</p>
                <p>• Confirme sua senha:<br>
                    <input name="geral_senha_confirma" type="password" id="geral_senha_confirma" style="width:200px;" maxlength="9"/>
                    *</p>
                <p>&nbsp;</p>
                <p id="p_geral_cpf" style="display: table-row;"> CPF:<br><input name="geral_cpf" class="cpf" type="text" style="width:200px;"  maxlength="14" />
                    *<br>
                    <br></p>
                <p id="p_geral_rg" style="display: table-row;"> RG:<br><input name="geral_rg" type="text" id="geral_rg" style="width:200px;" onkeypress="sonumeros(event)" maxlength="20"/>
                    *<br>
                    <br></p>
                <p id="p_geral_data_nascimento" style="display: table-row;"> Data de Nascimento:<br><input name="geral_dia" type="text" id="geral_dia" style="width:20px;" maxlength="2"/> 
                    / <input name="geral_mes" type="text" id="geral_mes" style="width:20px;" maxlength="2"/> 
                    / <input name="geral_ano" type="text" id="geral_ano" style="width:40px;" maxlength="4"/>
                    *<br>
                    <br>
                </p>
                <p id="p_geral_data_organizacao" style="display: none;"> Data de Organização:<br>
                    <input name="geral_dia_org" type="text" id="geral_dia_org" style="width:20px;" maxlength="2"/> 
                    / <input name="geral_mes_org" type="text" id="geral_mes_org" style="width:20px;"  maxlength="2"/> 
                    / <input name="geral_ano_org" type="text" id="geral_ano_org" style="width:40px;"  maxlength="4"/>
                    *
                    <br>
                    <br>
                </p>
                    
                <p id="p_geral_estado_civil" style="display: table-row;"> Estado Civil:<br>
                    <select name="geral_estado_civil" class="select" style="width:200px;">
                        <option value="">Selecione</option>
                        <option value="Solteiro">Solteiro</option>
                        <option value="Casado">Casado</option>
                        <option value="Divorciado">Divorciado</option>
                        <option value="Viúvo">Viúvo</option>
                    </select>
                    *<br>
                    <br></p>
                        
                <p id="p_geral_sexo" style="display: table-row;"> Sexo:<br>
                    <select name="geral_sexo" class="select" style="width:200px;">
                        <option value="">Selecione</option>
                        <option value="Feminino">Feminino</option>
                        <option value="Masculino">Masculino</option>
                    </select>
                    *<br>
                    <br></p>
                        
                <p id="p_geral_evangelico" style="display: table-row;"> Evangélico? * <br>
                    <input name="geral_evangelico" type="radio" class="radio" value="1"/>
                    &nbsp;Sim&nbsp;&nbsp;&nbsp;&nbsp;
                    <input name="geral_evangelico" type="radio" class="radio" value="0"/>
                    &nbsp;Não<br>
                    <br></p>
                        
                <p id="p_geral_proprietario_evangelico" style="display: none;"> Proprietário Evangélico? * <br>
                    <input name="geral_proprietario_evangelico" type="radio" class="radio" value="sim">
                    &nbsp;Sim&nbsp;&nbsp;&nbsp;&nbsp;
                    <input name="geral_proprietario_evangelico" type="radio" class="radio" value="não">
                    &nbsp;Não<br>
                    <br></p>
                        
                <p id="p_geral_igreja" style="display: table-row;"> Igreja:<br><input name="geral_igreja" type="text" id="geral_igreja" style="width:200px;" maxlength="50">
                    *<br>
                    <br>
                </p>
                    
                <p id="p_geral_empresa_igreja" style="display: none;"> Empresa se relaciona com qual igreja:<br><input name="geral_emp_igreja" type="text" id="geral_emp_igreja" style="width:200px;" maxlength="50"/>
                    *<br>
                    <br>
                </p>
                    
                <p> Site da Igreja:<br><input name="geral_site_igreja" type="text" id="geral_site_igreja" style="width:200px;" maxlength="500"/>
                    **
                </p>
                    
                <p id="p_geral_e_pastor"> Pastor? * <br>
                    <input name="geral_e_pastor" type="radio" class="radio" value="1"/>
                    &nbsp;Sim&nbsp;&nbsp;&nbsp;&nbsp;
                    <input name="geral_e_pastor" type="radio" class="radio" value="0"/>
                    &nbsp;Não
                    <br><br>
                </p>
                    
                <p> Nome do Pastor:<br><input name="geral_nome_pastor" type="text" id="geral_nome_pastor" style="width:200px;" maxlength="500"/>
                    **
                </p>
                    
                <p> E-mail do Pastor:<br><input name="geral_email_pastor" type="text" id="geral_email_pastor" style="width:200px;" maxlength="500"/>
                    **
                </p>
                <br>
                <br>
                <p> Nome do Responsável para os menores de 18 anos:<br>
                    <input name="geral_nome_responsavel" type="text" id="geral_nome_responsavel" style="width:200px;" maxlength="500"/>
                </p>
                    
                <p> E-mail do responsável:<br>
                    <input name="geral_email_responsavel" type="text" id="geral_email_responsavel" style="width:200px;" maxlength="500"/>
                </p>
                    
                <p id="p_geral_ramo" style="display: table-row;"> Ramo de Atividade se  profissional liberal:<br><input name="geral_ramo_atividade" type="text" style="width:200px;" maxlength="100"/><br><br>
                </p>
                    
                <p id="p_geral_ramo_empresa" style="display: none;"> Ramo de Atividade da empresa<br><input name="geral_ramo_atividade" type="text" style="width:200px;" maxlength="100"/><br><br>
                </p>
            </div>
                
            <!--coluna 2-->
            <div class="coluna2">
                <p><b>Endereço</b></p>
                    
                <p> Endereço:<br>
                    <input name="geral_endereco" type="text" id="geral_endereco" style="width:200px;" maxlength="1000"/>
                    *
                </p>
                    
                <p> Número:<br>
                    <input name="geral_numero" type="text" id="geral_numero" style="width:60px;" maxlength="50"/>
                    *
                </p>
                    
                <p> Complemento:<br><input name="geral_complemento" type="text" id="geral_complemento" style="width:200px;" maxlength="2000"/>
                </p>
                    
                <p> Bairro:<br><input name="geral_bairro" type="text" id="geral_bairro" style="width:200px;" maxlength="500"/>
                    *
                </p>
                    
                <p> Cidade:<br><input name="geral_cidade" type="text" id="geral_cidade" style="width:200px;" maxlength="500"/>
                    *
                </p>
                    
                <p> CEP:<br><input name="geral_cep" type="text" id="geral_cep" style="width:200px;" class="cep" maxlength="9" />
                    *
                </p>
                    
                <p> UF:<br>
                    <select name="geral_uf" class="select" id="geral_uf" style="width:200px;">
                        <option value="">Selecione</option>
                        <option value="AC">AC </option>
                        <option value="AL">AL </option>
                        <option value="AM">AM </option>
                        <option value="AP">AP </option>
                        <option value="BA">BA </option>
                        <option value="CE">CE </option>
                        <option value="DF">DF </option>
                        <option value="ES">ES </option>
                        <option value="GO">GO </option>
                        <option value="MA">MA </option>
                        <option value="MG">MG </option>
                        <option value="MS">MS </option>
                        <option value="MT">MT </option>
                        <option value="PA">PA </option>
                        <option value="PB">PB </option>
                        <option value="PE">PE </option>
                        <option value="PI">PI </option>
                        <option value="PR">PR </option>
                        <option value="RJ">RJ </option>
                        <option value="RN">RN </option>
                        <option value="RO">RO </option>
                        <option value="RR">RR </option>
                        <option value="RS">RS </option>
                        <option value="SC">SC </option>
                        <option value="SE">SE </option>
                        <option value="SP">SP </option>
                        <option value="TO">TO </option>
                    </select>
                    *</p>
                <br>
                <br>
                    
                <p><b>Telefones</b> *** </p>
                    
                <p id="p_geral_telefone_res" style="display: table-row;"> Residencial:<br><input name="geral_res" type="text" id="geral_res" style="width:200px;" onkeypress="mascara (this,itelefone)" maxlength="14">
                    <br>
                    <br>
                </p>
                    
                <p> Empresa:<br><input name="geral_com" type="text" id="geral_com" style="width:200px;" maxlength="14" onkeypress="mascara (this,itelefone)">
                </p>
                    
                <p> Celular:<br><input name="geral_celular" type="text" id="geral_celular" style="width:200px;" maxlength="14" onkeypress="mascara (this,itelefone)">
                </p>
                    
                <p> Recado:<br><input name="geral_rec" type="text" id="geral_rec" style="width:200px;" maxlength="14" onkeypress="mascara (this,itelefone)">
                </p>
                    
                <p><input type="checkbox" name="recebe_news" value="1" checked=""> Deseja receber newsletters.
                </p>
            </div>
                
            <div style="clear:both;"></div>
                
        </div>
    </div> 
    <input type="submit" value="Salvar" name="bot_salvar" class="ui-button botao" />
    <?= anchor('admin/clientes', 'Cancelar'); ?>
</form>

    <table border="0" width="100%" align="center" class="ui-widget" id="table_form">
        <thead>
            <tr>
                <th></th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Nome</td>
                <td><input type="text" name="nome" value="<?= set_value('nome'); ?>" size="45" class="form_input" /></td>
            </tr>
            <tr>
                <td>Rg</td>
                <td><input type="text" name="rg" value="<?= set_value('rg'); ?>" size="45" class="form_input" /></td>
            </tr>
            <tr>
                <td>Cpf</td>
                <td><input type="text" name="cpf" value="<?= set_value('cpf'); ?>" size="45" class="form_input cpf" /></td>
            </tr>
            <tr>
                <td>Endereço</td>
                <td><input type="text" name="endereco" value="<?= $row->endereco; ?>" size="45" class="form_input" /></td>
            </tr>
            <tr>
                <td>Bairro</td>
                <td><input type="text" name="bairro" value="<?= $row->bairro; ?>" size="45" class="form_input" /></td>
            </tr>
            <tr>
                <td>Cidade</td>
                <td><input type="text" name="cidade" value="<?= $row->cidade; ?>" size="45" class="form_input" /></td>
            </tr>
            <tr>
                <td>uf</td>
                <td><input type="text" name="uf" value="<?= $row->uf; ?>" size="45" class="form_input" /></td>
            </tr>
            <tr>
                <td>Cep</td>
                <td><input type="text" name="cep" id="cep" value="<?= $row->cep; ?>" size="45" class="form_input cep" /></td>
            </tr>
            <tr>
                <td>Telefone</td>
                <td><input type="text" name="telefone" value="<?= $row->telefone; ?>" size="45" class="form_input fone" /></td>
            </tr>
            <tr>
                <td>Celular</td>
                <td><input type="text" name="celular" value="<?= $row->celular; ?>" size="45" class="form_input fone" /></td>
            </tr>
            <tr>
                <td>Email</td>
                <td><input type="text" name="email" value="<?= $row->email; ?>" size="45" class="form_input" /></td>
            </tr>
            <tr>
                <td>Senha</td>
                <td><input type="password" name="senha" size="25" class="form_input" /></td>
            </tr>
            <tr>
                <td>Redigite a Senha</td>
                <td><input type="password" name="senha2" size="25" class="form_input" /></td>
            </tr>
            <tr>
                <td></td>
                <td>
                   
                </td>
            </tr>
        </tbody>
    </table>
</form>